//
//  ZXDiscoverViewController.m
//  ZXOCWeiBo
//
//  Created by mac on 15/11/28.
//  Copyright © 2015年 itcast. All rights reserved.
//

#import "ZXDiscoverViewController.h"

#import "ZXDiscoverSearchBar.h"

@interface ZXDiscoverViewController ()

@end

@implementation ZXDiscoverViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //网导航栏标签View添加搜索框
    ZXDiscoverSearchBar * searBar = [ZXDiscoverSearchBar searchBar];
    
//    searBar.backgroundColor = [UIColor redColor];
    
    //设置searchbar的Bounds
    CGFloat searchBarW = [UIScreen mainScreen].bounds.size.width - 20;
    
    CGRect searchbarBounds = searBar.bounds;
    
    //重新设置宽度
    searchbarBounds.size.width = searchBarW;
    searBar.bounds = searchbarBounds;
    self.navigationItem.titleView = searBar;
}



@end
